<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>学员管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/ems/emsJoin/">学员列表</a></li>
		<shiro:hasPermission name="ems:emsStudent:edit"><li><a href="${ctx}/ems/emsJoin/form?newType=add">新学员报名</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="emsStudent" action="${ctx}/ems/emsJoin/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<%-- <li><label>报名人：</label>
				<sys:treeselect id="user" name="user.id" value="${emsStudent.user.id}" labelName="user.name" labelValue="${emsStudent.user.name}"
					title="用户" url="/sys/office/treeData?type=3" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			</li> --%>
			<li><label>学员编号：</label>
				<form:input path="no" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>学员姓名：</label>
				<form:input path="name" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>手机号码：</label>
				<form:input path="mobile" htmlEscape="false" maxlength="16" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<!-- <th>报名人</th> -->
				<th>学员编号</th>
				<th>学员姓名</th>
				<th>是否新生</th>
				<th>性别</th>
				<th>出生日期</th>
				<th>手机号码</th>
				<th>年级</th>
				<th>学校</th>
				<th>地址</th>
				<th>往期培训</th>
				<th>是否启用</th>
				<th>创建时间</th>
				<th>备注</th>
				<shiro:hasPermission name="ems:emsStudent:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="emsStudent">
			<tr>
				<%-- <td><a href="${ctx}/ems/emsStudent/form?id=${emsStudent.id}">
					${emsStudent.user.name}
				</a></td> --%>
				<td>
					${emsStudent.no}
				</td>
				<td>
					${emsStudent.name}
				</td>
				<td>
					${fns:getDictLabel(emsStudent.isNew, 'yes_no', '')}
				</td>
				<td>
					<c:if test="${'1' eq emsStudent.sex}">
						男
					</c:if>
					<c:if test="${'0' eq emsStudent.sex}">
						女
					</c:if>
					
				</td>
				<td>
					<fmt:formatDate value="${emsStudent.birth}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${emsStudent.mobile}
				</td>
				<td>
					${emsStudent.grade}
				</td>
				<td>
					${emsStudent.school}
				</td>
				<td>
					${emsStudent.address}
				</td>
				<td>
					${emsStudent.pastTrain}
				</td>
				<td>
					${fns:getDictLabel(emsStudent.status, 'yes_no', '')}
				</td>
				<td>
					<fmt:formatDate value="${emsStudent.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${emsStudent.remarks}
				</td>
				<shiro:hasPermission name="ems:emsStudent:edit"><td>
    				<%-- <a href="${ctx}/ems/emsStudent/form?id=${emsStudent.id}">修改</a>
					<a href="${ctx}/ems/emsStudent/delete?id=${emsStudent.id}" onclick="return confirmx('确认要删除该学员吗？', this.href)">删除</a> --%>
					<a href="${ctx}/ems/emsJoin/form?id=${emsStudent.id}&newType=${emsStudent.isNew}">报名</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>